package com.yxym.enum_;

public class Enumeration02 {
    public static void main(String[] args) {
        System.out.println(Season2.SPRING);
        System.out.println(Season2.WINTER);
    }
}
enum Season2{//使用关键字来进行枚举
//    public static final Season SPRING = new Season("春天","温暖");
//    public static final Season SUMMER  = new Season("夏天","炎热");
//    public static final Season AUTUMN  = new Season("秋天","凉爽");
//    public static final Season WINTER = new Season("冬天","寒冷");
    SPRING("春天","温暖"), WINTER("冬天","寒冷");
    //1.多个常量，用逗号来隔绝
    //2.定义的常量对象，写在前面
    private String name;
    private String desc;
//    private Season2(){
//
//    }
    private Season2(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        return "Season{" +
                "name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}